package com.hejr.test01.mapper;

import com.hejr.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
* @desc:
* @author:hejr
* @date:2019/4/9
*/
@Repository
public interface UserMapperTest01 {

	@Select("SELECT * FROM TB_USER WHERE NAME = #{name}")
	User findByName(@Param("name") String name);


	@Insert("INSERT INTO TB_USER(NAME, AGE) VALUES(#{name}, #{age})")
	int insert(@Param("name") String name, @Param("age") Integer age);
}
